package com.zzyl.nursing.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzyl.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 预约信息DTO
 *
 * @author: yhy
 * @date: 2021/1/27
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "预约信息")
@Builder
@TableName("reservation")
public class Reservation extends BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)  // 修改这里
    @ApiModelProperty(value = "预约ID")
    private Long id;

    @TableField(value = "name")
    @ApiModelProperty(value = "预约人姓名")
    private String name;

    @TableField(value = "mobile")
    @ApiModelProperty(value = "预约人手机号")
    private String mobile;

    @TableField(value = "visitor")
    @ApiModelProperty(value = "家人姓名")
    private String visitor;

    @TableField(value = "time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "参观时间")
    private LocalDateTime time;

    @TableField(value = "type")
    @ApiModelProperty(value = "预约类型", notes = "0=参观预约，1=探访预约")
    private Integer type;

    @TableField(value = "status")
    @ApiModelProperty(value = "预约状态", notes = "0=取消，1=成功，2=结束，3=过期")
    private Integer status;


}
